import {Component, OnInit} from '@angular/core';
import {LifeService} from '../../../shared/service/life.service';

@Component({
  selector: 'app-diary',
  templateUrl: './diary.component.html',
  styleUrls: ['./diary.component.scss']
})
export class DiaryComponent implements OnInit {
  diaries;

  constructor(private lifeService: LifeService) {
  }

  ngOnInit() {
    this.lifeService.getDiaryList().subscribe((res) => {
      this.diaries = res;
    });
  }

}
